﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.sys.notice.Edit" ValidateRequest="false" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>公告信息</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/sys.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/exam.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/sys.js"></script>
  <script type="text/javascript" src="/js/exam.js"></script>
  <script type="text/javascript" src="/js/CheckBox.js"></script>
  <script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
  <script type="text/javascript">
    window.onload = function() {
      document.getElementById("form1").style.display = "";
    }
  </script>
  <style type="text/css">.left{ width:110px; }</style>
</head>
<body>
  <form id="form1" method="post" action="" style="display:none;">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;公告信息</div>
      </div>
      <div class="spe_line_2"></div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>标题：</div>
        <div class="fl"><input type="text" id="TitleTxt" name="TitleTxt" maxlength="200" style="width:300px;" value="<%=model.Title %>" /></div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>类别：</div>
        <div class="fl">
          <% if (categoryList != null && categoryList.Count > 0) { %>
          <select id="CategorySlt" name="CategorySlt">
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in categoryList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          </select>
          <% } %>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>是否为系统公告：</div>
        <div class="fl">
          <select id="SysSlt" name="SysSlt">
      <% if (authority == E.Enum.EnumTeacherAuthority.Admin) { %>
            <option value="-1">全部</option>
            <option value="1">是</option>
            <option value="0">否</option>
      <% } else { %>
            <option value="0">否</option>
      <% } %>
          </select>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>地区：</div>
        <div class="fl">
          <ul>
          <% if (areaList != null && areaList.Count > 0) { %>
            <% int i = 0; %>
            <% foreach(DictAreaModel areaModel in areaList) { %>
            <li><input type="checkbox" id="AreaChb_<%=i %>" name="AreaChb" class="fl c_chb" value="<%=areaModel.ID%>" /><div class="fl left_2">&nbsp;<%=areaModel.Name%></div></li>
            <% i++; %>
            <% } %>
          <% } %>
          </ul>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>内容：</div>
        <div class="fl"><textarea id="ContentTxt" name="ContentTxt" style="width:540px; height:400px;"><%=model.Content%></textarea></div>
      </div>
      
      <input type="hidden" id="act" name="act" value="<%=act %>" />
      <input type="hidden" id="id" name="id" value="<%=id %>" />
      <input type="hidden" id="chk_v" name="chk_v" />
      <input type="hidden" id="area_v" name="area_v" value="<%=area_v %>" />
      <div style="width:350px; margin-top:20px; text-align:center;">
        <% if (act == "u") { %>
          <% if (authority == E.Enum.EnumTeacherAuthority.Admin || teacherid == model.PublisherID) { %>
        <input type="image" src="/images/btn/confirm.gif" style="width:52px; height:22px;" onclick="return CheckNoticeForm();" />&nbsp;&nbsp;
          <% } %>
        <% } else { %>
        <input type="image" src="/images/btn/confirm.gif" style="width:52px; height:22px;" onclick="return CheckNoticeForm();" />&nbsp;&nbsp;
        <% } %>
        
        <a href="/sys/notice/List.aspx"><img alt="" src="/images/btn/back.gif" /></a>
      </div>
    </div>
    
    <script type="text/javascript">
      <% if (act == "u") { %>
      InitAreaData();
      $("#CategorySlt").val(<%=model.CategoryID %>);
      $("#SysSlt").val(<%=model.IsSys ? "1" : "0" %>);
      <% } %>
    </script>
    <script type="text/javascript">
      var FCKeditor = new FCKeditor("ContentTxt");
        FCKeditor.BasePath = "/fckeditor/"; 
        FCKeditor.Width = 540;
        FCKeditor.Height = 400;
        FCKeditor.ToolbarSet = "Default";
        FCKeditor.ReplaceTextarea();
        </script>
  </form>
</body>
</html>
